import Vue from 'vue'
import VueRouter from 'vue-router'

const Home = () => import('../views/home/Home')
const Category = () => import('../views/category/Category')
const Cart = () => import('../views/cart/Cart')
const Profile = () => import('../views/profile/Profile')
const Detail = () => import('../views/detail/Detail')

Vue.use(VueRouter)

const routes = [
  {
    path:'',
    redirect:'/Home'
  },
  {
    path:'/Cart',
    component:Cart
  },
  {
    path:'/Category',
    component:Category
  },
  {
    path:'/Home',
    component:Home
  },
  {
    path:'/Profile',
    component:Profile
  },
  {
    path:'/Detail/:iid',
    component:Detail
  }
]
const router = new VueRouter({
  routes,
  base:process.env.NODE_ENV,
  // mode:'history',
})
export default router